<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      >
<h:head/>      
<h:body>
    <ui:composition template="template/main.xhtml">
                
    <ui:define name="body">
        <div class="col-sm-12">
		    <div class="panel panel-default">
		        <div class="panel-heading"><h4>Carrito de Compras</h4></div>
		        <div class="panel-body">
                    <table class="table table-striped table-bordered">
						<thead>
							<tr>
								<th style="width:17%">Imagen</th>
								<th>Nombre del producto</th>
								<th style="width:15%">Precio unitario</th>
								<th style="width:10%">Cantidad</th>
								<th style="width:10%">Subtotal</th>
								<th style="width:7%">Eliminar</th>
							</tr>
						</thead>
						<tbody>
                        <c:forEach begin="1" end="3">
							<tr>
	                            <td><p:graphicImage library="images" name="Products/MacBookAir.jpg" styleClass="img-responsive"/></td>
								<td>
								    Titulo <br />
								    <h:link outcome="viewProduct" style="margin-top:8px" styleClass="btn btn-default btn-sm" >
								        <f:param name="codigo" value="1"/>
								        Ver Producto
								    </h:link>
								</td>
								<td>S/. 850.85</td>
								<td>
								<h:form>
			                        <p:inputText value="#{addCart.cantidad}" styleClass="form-control" style="width:50px;text-align:center;margin-bottom:8px"/>
								    <p:commandLink value="Actualizar" styleClass="btn btn-default btn-sm"/>                                      
								</h:form>
							</td>
							  <td>S/. 1700.60</td>
							  <td>
							     <h:link styleClass="btn btn-danger pull-right">
							         <f:param name="prodCodi" value="1"/>
							         <i class="fa fa-trash-o"></i>
							     </h:link>
							  </td>
							</tr>
						    
						</c:forEach>
                        </tbody>
					</table>
					<div class="clearfix pull-left">
					    <p>(*) El envío para Lima y provincias es totalmente gratis.</p> 
					</div>
					<div class="clearfix pull-right">
					    <div class="well well-sm text-right">
					        <h4>Total S/. 5800.50</h4>
					    </div>
					    <p>
					        <h:link value="Continuar comprando" outcome="index" styleClass="btn btn-default" style="margin-right:7px"/>
					        <h:link value="Checkout" styleClass="btn btn-success" />					
					    </p>
					</div>
		        </div>
		    </div>
        </div>                       
        
    </ui:define>
        
    
    </ui:composition>
</h:body>
</html>